package com.elmcode.study.design.pro04_proxy.staticProxy;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DogProxy implements Animal{

    private Animal animal;

    public DogProxy(Dog dog){
        this.animal = dog;
    }

    @Override
    public void run() {
        log.info("狗狗被人吓到了");
        animal.run();
        log.info("狗狗现在安全了");
    }
}
